<template>
  <a-spin :spinning="confirmLoading">
    <a-form-model ref="form" :model="models" :rules="validatorRules">
      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="theme" required label="邮件主题格式">
        <a-input placeholder="你想要创建什么类型的邮件" v-model="models.theme" />
      </a-form-model-item>
      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="content" required label="邮件内容描述">
        <a-textarea :rows="5" v-model="models.content" placeholder="请输入邮件内容描述" />
      </a-form-model-item>
      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tone" required label="语气">
        <a-input placeholder="请输入语气 例如：正常、友好、严厉 等" v-model="models.tone" />
      </a-form-model-item>
      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wordNumber" label="字数限制">
        <a-input placeholder="请输入字数限制" v-model="models.wordNumber" />
      </a-form-model-item>
    </a-form-model>
  </a-spin>
</template>

<script>
// import IndexChart from './IndexChart'
// import IndexTask from "./IndexTask"
// import IndexBdc from './IndexBdc'
import { mapGetters } from 'vuex'
import { sessionNoteList } from '@/api/api'
import { deleteAction } from '@/api/manage'
export default {
  name: 'WorkPlanReprt',
  components: {
    // IndexChart,
    // IndexTask,
    // IndexBdc
  },
  props: {
    model: {
      type: Object,
      default: {},
    },
  },
  data() {
    return {
      
      models: this.model,
      confirmLoading: false,
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 12 },
      },
      validatorRules: {
        theme: [{ required: true, message: '请输入邮件主题' }],
        content: [{ required: true, message: '请输入内容描述' }],
        tone: [{ required: true, message: '请输入生成语气' }],
      },
    }
  },
  created() {},
  computed: {},

  mounted() {},
  methods: {
    
    generatedBtnProp() {
      // console.log('this.selectedValue.join(",")',this.selectedValue.join(","))
      // return
      let obj = {
        theme: this.models.theme,
        content: this.models.content,
        tone: this.models.tone,
        wordNumber: this.models.wordNumber,
      }
      this.$refs.form.validate((valid) => {
        if (valid) {
          this.$emit('appApiAsk', 1, obj)
        } else {
          this.$emit('appApiAsk', 2, obj)
        }
      })
    },
  },
}
</script>

<style lang="less">
</style>